package 集合

fun main() {
    val map = mapOf("Jack" to 20, "Jason" to 18, "John" to 30)
    println(map["Jack"])
    println(map.getValue("Jack"))
    println(map.getOrElse("Rose") { "UnKnown" })
    println(map.getOrDefault("Bill", 0))

    println("---------------------------------------------------")

    map.forEach {
        println("${it.key},${it.value}")
    }
}